source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
use_frameworks!
inhibit_all_warnings!

project 'GreenDeal.xcodeproj'

target 'GreenDeal' do
    #Sentry是self-hosted（公司自己的服务器），对应的项目配置->错误跟踪->Mobile->Swift中的文档配置，不能随便用最新的
    pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.20.0'
    pod 'MBProgressHUD', '0.9.2'
    pod 'Alamofire', '5.6.2'
    pod 'AlamofireImage', '4.2.0'
    pod 'HandyJSON', '5.0.2'
    pod 'MJRefresh', '3.7.5'
    pod 'SwiftyJSON', '5.0.1'
    pod 'SnapKit', '5.0.1'
    pod 'ReachabilitySwift', '5.0.0'
    pod 'FMDB', '2.7.5'
    pod 'FSCalendar', '2.8.4'
    pod 'SDWebImage', '4.4.8'
    pod 'SDWebImage/GIF', '4.4.8'
    pod 'FLAnimatedImage', '1.0.16'
    # (Recommended) Pod for Google Analytics
    pod 'Firebase/Analytics', '8.15.0'
    # Remote Notification
    pod 'Firebase/Messaging', '8.15.0'
    pod 'YJLocationConverter', '0.0.1'
    pod 'CryptoSwift', '1.4.3'
    pod 'IQKeyboardManagerSwift', '6.5.10'
    pod 'R.swift', '6.1.0'
    pod 'RxSwift', '6.5.0'
    pod 'RxCocoa', '6.5.0'
    pod 'RxDataSources', '5.0.0'
    #UIView的手势响应事件，例如label，imageview的tap响应
    pod "RxGesture", '4.0.4'
    pod "lottie-ios", '3.5.0'
    pod 'AMPopTip', '4.10.0'
    pod 'DaisyNet', '1.0.5'#处理缓存
    #先用内部库9.4.1修复crash的问题
#    pod 'DynamsoftBarcodeReader', '9.4.0'
#    pod 'DynamsoftCameraEnhancer','2.3.5'
    #用于应用内调试和探索工具。显示时，FLEX会显示一个工具栏，该工具栏位于应用程序上方的窗口中。从这个工具栏，您可以查看和修改运行中的应用程序中的几乎每一个状态。
#    pod 'FLEX', '5.22.10', :configurations => ['Debug']
end
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 12.0
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      end
    end
  end
  installer.aggregate_targets.each do |target|
    target.xcconfigs.each do |variant, xcconfig|
      xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
      IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
    end
  end
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
        xcconfig_path = config.base_configuration_reference.real_path
        IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
      end
    end
  end
end
